package org.crmsystem.service.impl;

import org.crmsystem.dao.ProKindMapper;
import org.crmsystem.model.ProKind;
import org.crmsystem.service.IProKindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/8/8.
 */
@Service
public class ProKindServiceImpl implements IProKindService{

    @Autowired
    private ProKindMapper proKindMapper;
    /**
     * <!--根据主键id删除种类-->
     *
     * @param id the id
     * @return the int
     */
   public int deleteByPrimaryKey(Integer id){
       return proKindMapper.deleteByPrimaryKey(id);
   }

    /**
     * <!--插入产品种类-->
     *
     * @param record the record
     * @return the int
     */
    public  int insert(ProKind record){
        return proKindMapper.insert(record);
    }

    /**
     * <!--根据主键id查种类-->
     *
     * @param id the id
     * @return the pro kind
     */
    public ProKind selectByPrimaryKey(Integer id){
        return proKindMapper.selectProKindByPrimaryKey(id);
    }
    /**
     * <!--查找所有种类-->
     *
     * @param
     * @return the pro kind
     */
     public List<ProKind> select(){
        return proKindMapper.select();
    }

    /**
     * <!--根据主键id修改种类-->
     *
     * @param record the record
     * @return the int
     */
    public int updateByPrimaryKey(ProKind record){
        return proKindMapper.updateByPrimaryKey(record);
    }
}
